package cn.wildfirechat.app.common;

import java.io.Serializable;

/**
 * 前端支付参数响应
 */
public class PayResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    private String appId;
    private String timeStamp;
    private String nonceStr;
    private String packageValue; // 注意：前端字段名是"package"，但Java中package是关键字
    private String signType;
    private String paySign;
    private String prepayId;
    private String partnerId; // 商户ID，用于APP支付
    private String orderNo;   // 商户订单号

    // 状态信息
    private boolean success;
    private String code;
    private String message;

    // 构造函数
    public PayResponse() {}

    public PayResponse(boolean success, String code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    // Getters and Setters
    public String getAppId() { return appId; }
    public void setAppId(String appId) { this.appId = appId; }

    public String getTimeStamp() { return timeStamp; }
    public void setTimeStamp(String timeStamp) { this.timeStamp = timeStamp; }

    public String getNonceStr() { return nonceStr; }
    public void setNonceStr(String nonceStr) { this.nonceStr = nonceStr; }

    public String getPackageValue() { return packageValue; }
    public void setPackageValue(String packageValue) { this.packageValue = packageValue; }

    public String getSignType() { return signType; }
    public void setSignType(String signType) { this.signType = signType; }

    public String getPaySign() { return paySign; }
    public void setPaySign(String paySign) { this.paySign = paySign; }

    public String getPrepayId() { return prepayId; }
    public void setPrepayId(String prepayId) { this.prepayId = prepayId; }

    public String getPartnerId() { return partnerId; }
    public void setPartnerId(String partnerId) { this.partnerId = partnerId; }

    public String getOrderNo() { return orderNo; }
    public void setOrderNo(String orderNo) { this.orderNo = orderNo; }

    public boolean isSuccess() { return success; }
    public void setSuccess(boolean success) { this.success = success; }

    public String getCode() { return code; }
    public void setCode(String code) { this.code = code; }

    public String getMessage() { return message; }
    public void setMessage(String message) { this.message = message; }

    @Override
    public String toString() {
        return "PayResponse{" +
            "appId='" + appId + '\'' +
            ", timeStamp='" + timeStamp + '\'' +
            ", nonceStr='" + nonceStr + '\'' +
            ", packageValue='" + packageValue + '\'' +
            ", signType='" + signType + '\'' +
            ", paySign='" + paySign + '\'' +
            ", prepayId='" + prepayId + '\'' +
            ", partnerId='" + partnerId + '\'' +
            ", orderNo='" + orderNo + '\'' +
            ", success=" + success +
            ", code='" + code + '\'' +
            ", message='" + message + '\'' +
            '}';
    }
}
